from django.db import models
from base.models.MyUser import MyUser
from base.models.travelSpot import travelSport


class MyUserCommend(models.Model):
    user = models.CharField(max_length=200)
    spot = models.ForeignKey(travelSport, on_delete=models.CASCADE)
    rate = models.FloatField(max_length=3)
    content = models.CharField(max_length=200)

    def __str__(self) -> str:
        return f"{self.user} - {self.spot}"
